package model;
import java.util.*;

public class Case 
{
	private String startDate;
	private String extensionDate;
	private String debt;
	private String contract;
	private String information;
	private String historyArea;
	private String processed;
	private String endDate;
	private String id;
	private Client client;
	private Debtor debtor;
	private Vehicle vehicle;
	private ArrayList<Employee> empList = new ArrayList<Employee>();
	
	public Case(String startDate, String debt, String contract, String processed, Client client, Debtor debtor)
	{
		this.startDate = startDate;
		this.debt = debt;
		this.contract = contract;
		this.processed = processed;
		this.client = client;
		this.debtor = debtor;
	}
	
	public Case()
	{
		
	}

	public String getStartDate() {
		return startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	public String getExtensionDate() {
		return extensionDate;
	}

	public void setExtensionDate(String extensionDate) {
		this.extensionDate = extensionDate;
	}

	public String getDebt() {
		return debt;
	}

	public void setDebt(String debt) {
		this.debt = debt;
	}

	public String getContract() {
		return contract;
	}

	public void setContract(String contract) {
		this.contract = contract;
	}

	public String getInformation() {
		return information;
	}

	public void setInformation(String information) {
		this.information = information;
	}

	public String getHistoryArea() {
		return historyArea;
	}

	public void setHistoryArea(String historyArea) {
		this.historyArea = historyArea;
	}

	public String getProcessed() {
		return processed;
	}

	public void setProcessed(String processed) {
		this.processed = processed;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	public ArrayList<Employee> getEmployees() {
		return empList;
	}

	public void setEmployees(ArrayList<Employee> employees) {
		this.empList = employees;
	}

	public Client getClient() {
		return client;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	public Debtor getDebtor() {
		return debtor;
	}

	public void setDebtor(Debtor debtor) {
		this.debtor = debtor;
	}
	
	public Vehicle getVehicle() {
		return vehicle;
	}
	
	public void setVehicle(Vehicle vehicle) {
		this.vehicle = vehicle;
	}
	
	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	public void removeEmployee(Employee toRemove)
	{
		Iterator<Employee> it = empList.iterator();
		while(it.hasNext())
		{
			Employee empParse = it.next();
			if(toRemove.getCpr().equals(empParse.getCpr())) it.remove();
		}
	}
	
	public void addEmployee(Employee toAdd)
	{
		empList.add(toAdd);
	}
}
